import request from '@/utils/request'
const listItem = (params = {}) => {
  return request.get('/getItemList', { params })
}
// 批量新增商品
const addItems = (params = {}) => {
  return request.post('/addItems', params)
}
// 新增单个商品
const addItem = (params = {}) => {
  return request.post('/addItem', params)
}
// 修改商品
const updateItem = (params = {}) => {
  return request.put('/updateItem', params)
}
// 删除商品
const delItem = (params = {}) => {
  return request.delete('/delItem', { params })
}
// 获取商品详情
const getItemDetail = (params = {}) => {
  return request.get('/itemDetail', { params })
}

export {
  listItem,
  addItems,
  addItem,
  updateItem,
  delItem,
  getItemDetail
}
